package ooday03.practise.practise_01;

public class InterfaceDemo  {
    public static void main(String[] args) {
        Inter inter=new InterImpl();
        inter.show();

        //匿名内部类
        Inter inter1=new Inter() {
            @Override
            public void show() {
                System.out.println("匿名内部类实现接口的方法");
            }
        };
        inter1.show();
    }

}

interface Inter{
    public void  show();
}

class InterImpl implements Inter{
    @Override
    public void show(){
        System.out.println("实现接口的方法");
    }
}
